import type Handsontable from 'handsontable';

export interface IPaginationConfig {
    current: number;
    pageSize: number;
    total: number;
}

export interface IOperationConfig {
    enableEdit?: boolean;
    enableDelete?: boolean;
    enableView?: boolean;
    enableAdd?: boolean;
}



// 列配置
export interface IColumnConfig {
    title: string;
    key: string;
    type?: string;
    dateFormat?: string,
    allowInvalid?: boolean,
    className?: string;
    headerClassName?: string;
    width?: number;
    readOnly?: boolean;
    renderer?: (instance: any, td: any, row: any, col: any, prop: any, value: any, cellProperties: any) => void;
}


export interface HotElementInitSetting {
    pagination: IPaginationConfig;
    operation: IOperationConfig;
    tableConfig: Handsontable.GridSettings;
    columns: IColumnConfig[];
    data: any[];
}
